package com.xbongbong.paas.pojo.dto;/*/*/

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

/**
 * 评论评论用dto
 * @author 魏荣杰
 * @date 2019/5/12 15:57
 * @since v1.0
 * @version v1.0
 */
@Setter
@Getter
@ToString
public class CommentAddOnCommentDTO extends BaseDTO {
    private static final long serialVersionUID = 4500373625852099939L;

    @NotNull(message = "{dto.msg.commentAddOnComment.appId.NotNull}")
    private Long appId;
    /**
     * 引用id
     */
    @NotNull(message = "{dto.msg.commentAddOnComment.refId.NotNull}")
    private Long refId;

    /**
     * 评论内容
     */
    @NotBlank(message = "{dto.msg.commentAddOnComment.content.NotBlank}")
    @Size(max = 2000,message = "{dto.msg.commentAddOnComment.content.Size}")
    private String content;

    /**
     * 艾特的用户id
     */
    private List<String> atUserIds;

    /**
     * 用户名称
     */
    private String userName;

    /**
     * 用户头像
     */
    private String userAvatar;

    /**
     * 被回复人user_id
     */
    @NotNull
    private String refUserId;

    /**
     * 被回复人用户名称
     */
    private String refUserName;

    /**
     * 图片列表
     */
    private List<String> images;

    /**
     * 文件列表
     */
    private List<String> attachmentList;

    /**
     * 业务类型
     */
    @NotNull(message = "{dto.msg.commentAddOnComment.businessType.NotNull}")
    private Integer businessType;


    public CommentAddOnCommentDTO(){
        content = "";
        userName = "";
        userAvatar = "";
        refUserId = "";
        refUserName = "";
        images = new ArrayList<>();
        attachmentList = new ArrayList<>();
    }

    public void setAtUserIds(List<String> atUserIds) {
        this.atUserIds = atUserIds == null ? new ArrayList<>() : atUserIds;
    }
}
